var app = new Vue({
    el: '#app',
    data: {
        content: ''
    },
    created: function() {
        var questionContent = $.cookie('questionContent')
        this.content = questionContent
    },
    methods: {
        onSelect: function(masterId) {
            $.cookie('masterId', masterId);
            var questionContent = $.cookie('questionContent')

            var param = {
                masterId: masterId,
                questionContent: questionContent,
            }
            layer.open({ type: 2 });
            fly.request('/fd/submitQuestion', param, {
                    method: "post",
                })
                .then(function(response) {
                    console.log(response);
                    // layer.open({
                    //     content: '移动版和PC版不能同时存在同一页面',
                    //     btn: '我知道了'
                    // });
                    layer.closeAll();
                    var status = response.data.status
                    if (status == 200) {
                        var orderNo = response.data.info
                        window.location.href = '/fd/payQuestion/' + orderNo;
                        return;
                    } else {
                        var msg = response.data.msg
                        layer.open({
                            content: msg,
                            btn: '我知道了'
                        });
                    }
                })
                .catch(function(error) {
                    console.log(error);
                });
        }

    }
})